package com.tanhua.manage.job;

import com.tanhua.dubbo.api.mongo.ExploreApi;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时执行滑动数清零
 */
@Component
@Slf4j
public class ExploreJob {
    
    //注入探花api
    @Reference
    private ExploreApi exploreApi;
    
    
    /**
     * 定时任务
     */
    @Scheduled(cron = "59 59 23 * * ?") // 每天12点前执行一次
    public void execute() {
        log.info("执行恢复次数任务");
        //清零任务
        exploreApi.empty();
        
    }
    
}
